﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Adaptor
{
    public enum AdaptorType
    {
        None,
        Android,
        Ios,
    }
    /// <summary>
    /// 统一调用接口
    /// </summary>
    public interface IAdaptor
    {
        void Charge(AdaptorType adaptorType);
    }

    public class Adaptor : IAdaptor
    {   
        /*----很多代码
         * 
         * 接口用于拓展原始类不足的功能
            */



        AndroidLine androidLine = new AndroidLine();
        IosLine iosLine = new IosLine();
        public void Charge(AdaptorType adaptorType)
        {
            if (adaptorType==AdaptorType.Android)
            {
                androidLine.AndroidCharge();
            }
            else if (adaptorType == AdaptorType.Ios)
            {
                iosLine.IosCharge();
            }
        
        }
    }
}